0d8f7a4fa21ca607ccde0152bbf679a54c3234bd,src/org/redkale/source/DataDefaultSource.java,DataDefaultSource,updateColumn,#Connection#EntityInfo#Serializable#String#Serializable#,662

Before Change


                    + info.formatToString(value) + " WHERE " + info.getPrimarySQLColumn() + " = " + FilterNode.formatToString(id);
                if (debug.get()) logger.finest(info.getType().getSimpleName() + " update sql=" + sql);
                final Statement stmt = conn.createStatement();
                stmt.execute(sql);
                stmt.close();
            }
            //---------------------------------------------------

After Change



    private <T> int updateColumn(Connection conn, final EntityInfo<T> info, Serializable id, String column, Serializable value) {
        try {
            int c = -1;
            if (!info.isVirtualEntity()) {
                String sql = "UPDATE " + info.getTable(id) + " SET " + info.getSQLColumn(null, column) + " = "
                    + info.formatToString(value) + " WHERE " + info.getPrimarySQLColumn() + " = " + FilterNode.formatToString(id);
                if (debug.get()) logger.finest(info.getType().getSimpleName() + " update sql=" + sql);
                final Statement stmt = conn.createStatement();
                c = stmt.executeUpdate(sql);
                stmt.close();
            }
            //---------------------------------------------------
            final EntityCache<T> cache = info.getCache();
            if (cache == null) return c;
            T rs = cache.update(id, info.getAttribute(column), value);
            if (cacheListener != null) cacheListener.updateCache(info.getType(), rs);
            return c >= 0 ? c : (rs == null ? 0 : 1);
        } catch (SQLException e) {
            throw new RuntimeException(e);
        } finally {